﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.ServiceModel;

namespace WcfContrib.Client
{
    /// <summary>
    /// Represents a static class for defining information related to the client model
    /// </summary>
    public sealed class ClientModel
    {
        internal static event EventHandler EndpointAggregationChanged;

        private static string endpointAggregation = string.Empty;
        /// <summary>
        /// Gets or sets the endpoint aggregation.
        /// </summary>
        /// <value>The endpoint aggregation.</value>
        public static string EndpointAggregation
        {
            get { return endpointAggregation; }
            set
            {
                endpointAggregation = value;

                var evt = EndpointAggregationChanged;
                if (evt != null)
                {
                    evt(null, EventArgs.Empty);
                }
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether to throw generic FaultException&lt;T&gt; inner known exception.
        /// Defaults to <c>false</c>
        /// </summary>
        /// <value>
        /// 	<c>true</c> if o throw generic FaultException&lt;T&gt; inner known exception; otherwise, <c>false</c>.
        /// </value>
        public static bool ThrowInlineFaultExceptions { get; set; }
    }
}
